﻿using System;
using System.Collections;

namespace ArrayList1
{
    class Program
    {
        static void Main(string[] args)
        {
           
            ArrayList list = new ArrayList() { "大三元", "小三元", "暗刻们", "国士无双" };
            ArrayList newList = new ArrayList();


            foreach (var v in newList)
            {
                Console.WriteLine(v);
            }

            int index = list.IndexOf("大三元");
            if (index != -1)
            {
                Console.WriteLine("集合里有大三元！");
            }
            else
            {
                Console.WriteLine("集合中不存在大三元！");
                Console.WriteLine( );
            }


            ArrayList insertList = new ArrayList() { "能胡吗" };
            list.InsertRange(0, insertList);
            foreach (var v in list)
            {
                Console.WriteLine(v);
            }


            Console.WriteLine();

            
            list.Sort();
            foreach (var v in list)
            {
                Console.WriteLine(v);
            }
        }
    }
}
